<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户管理</title>
</head>
<style>
.xxx{ border-bottom:1px solid #666; width:100%;}
#button{ border:1px solid #03C; background-color:#03C; color:#FFF;}
</style>
<body>
<div class="xxx">
<h2>用户管理</h2>
</div>
<br />
<samp class="box">
<form id="form2" name="form2" method="post" action="index.php?p=admin&c=user&a=user">
  <label for="textfield"></label>
  <input type="text" name="textfield" />
  <input type="submit" name="button" id="button" value="搜索" />
</form>
</samp>
<br />
<form id="form1" name="form1" method="post" action="">
  <table width="839" border="1">
    <tr>
      <td width="110" align="center">用户名</td>
      <td width="40" align="center">性别</td>
      <td width="80" align="center">电话号码</td>
      <td width="100" align="center">邮箱</td>
      <td width="110" align="center">创建时间</td>
      <td colspan="2"></td>
    </tr>
<?php 
  if(empty($_POST['button'])){
   for($i=0;$i<count($rs);$i++){ ?>
    <tr>
      <td align="center"><?php echo $rs[$i]['username']; ?></td>
      <td align="center"><?php echo $rs[$i]['sex']; ?></td>
      <td align="center"><?php echo $rs[$i]['telephone']; ?></td>
      <td align="center"><?php echo $rs[$i]['email']; ?></td>
      <td align="center"><?php echo $rs[$i]['date']; ?></td>
      <td width="40" align="center"><a href="index.php?p=admin&c=user&a=data&id=<?php echo $rs[$i]['id']; ?>">更多</a></td>
      <td width="40" align="center"><a href="index.php?p=admin&c=user&a=delete&id=<?php echo $rs[$i]['id']; ?>">删除</a></td>
    </tr>
<?php } 
 }else{
?>
    <tr>
      <td align="center"><?php echo $rrs['username']; ?></td>
      <td align="center"><?php echo $rrs['sex']; ?></td>
      <td align="center"><?php echo $rrs['telephone']; ?></td>
      <td align="center"><?php echo $rrs['email']; ?></td>
      <td align="center"><?php echo $rrs['date']; ?></td>
      <td width="40" align="center"><a href="index.php?p=admin&c=user&a=data&id=<?php echo $rrs['id']; ?>">更多</a></td>
      <td width="40" align="center"><a href="index.php?p=admin&c=user&a=delete&id=<?php echo $rrs['id']; ?>">删除</a></td>
    </tr>
<?php } ?>
  </table>
</form>
</body>
</html>